package com.example.firstapp.activity;

import java.sql.Date;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.location.Location;
import android.os.Build;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;

import com.example.firstapp.R;
import com.example.firstapp.adapter.RestaurantAdapter;
import com.example.firstapp.core.GPSTracker;
import com.example.firstapp.core.PreferenceContext;
import com.example.firstapp.core.RecommenderEngine;
import com.example.firstapp.core.SocialContext;
import com.example.firstapp.core.SpatialContext;
import com.example.firstapp.entity.Domain;
import com.example.firstapp.entity.Domain.FoodType;
import com.example.firstapp.entity.Domain.Mode;
import com.example.firstapp.entity.Domain.PriceType;
import com.example.firstapp.entity.Restaurant;
import com.example.firstapp.entity.RestaurantReview;
import com.example.firstapp.entity.UserPreference;

public class DisplayRestaurantActivity extends Activity {

	/*
	 * Menu of restaurants R1: Bakgarden http://bakgarden-halden.no/meny R2:
	 * Saigon Take away Paper R3: Bryggerhuset
	 * http://www.brhuset.no/category/meny/ R4: American Pizza and Desert
	 * http://www.ppppp.no/bestill-online/produkter/pizza/ R5: Butt's Bistro &
	 * Tandoori AS http://www.buttsbistro.no/files/Meny.pdf R6: Pizzeria &
	 * Hamburgerbar http://www.divan.no/index.php?id=25 R7: Dragon houseS Photo
	 * R8: Marco Polo Pizza
	 * https://www.facebook.com/PizzaMarcoPoloHalden/photos/
	 * a.467581506616621.102918.467559256618846/477045995670172/?type=1&theater
	 * https
	 * ://www.facebook.com/PizzaMarcoPoloHalden/photos/a.467581506616621.102918
	 * .467559256618846/508849225823182/?type=1&theater R9: Dragon Plaza Ans
	 * R10: Campino http://campinohalden.no/ R11: Mcdonalds photo R12: Erlandsen
	 * Conditori AS https://www.facebook.com/53703196789/photos/pb.53703196789
	 * .-2207520000.1396796032./10151389695321790/?type=3&theater R13: Fabian
	 * restaurant og Pannekakeri
	 * https://www.facebook.com/photo.php?fbid=347550392016459
	 * &set=pb.285847234853442
	 * .-2207520000.1396956751.&type=3&src=https%3A%2F%2Fscontent
	 * -b.xx.fbcdn.net%2Fhphotos-frc1%2Ft31.0-8%2F
	 * 883631_347550392016459_861527728_o.jpg&smallsrc=https%3A%2F%2Fscontent-b.xx.fbcdn.net%2Fhphotos-prn1%2Ft1.0-9%2F64726_347550392016459_861527728_n.jpg&size=926%2C2048
	 * R14: Flamenco
	 * http://www.flamencohalden.no/index.php?option=com_phocamenu&
	 * view=dailymenu&Itemid=28 R15: Brygga mat- og vinhus photo R16: Pizza
	 * Xpressen www.pizzaxpressen.no R17: Lunchbaren Photo R18: Halden
	 * Gatekjokken Photo R19: Paviljongen Pizza Paper R20: Sakura Sushi Takeway
	 * AS Paper
	 */

	private ListView listview;
	private List<Restaurant> restaurants = new ArrayList<Restaurant>();

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_display_restaurant);
		// Show the Up button in the action bar.
		// setupActionBar();
		loadData();

		// init Engine and create result
		// Get current location
		Location location = null;
		GPSTracker gpsTracker = new GPSTracker(this);
		if (gpsTracker.isGPSEnabled()) {
			location = gpsTracker.getLocation();
		}

		SpatialContext spa = new SpatialContext(restaurants, location);

		// create social context
		SocialContext soc = new SocialContext(restaurants);

		// create preference context
		UserPreference userPref = ((MobileApplication) this.getApplication())
				.getPreference();
		SharedPreferences sharedPref = ((MobileApplication) this
				.getApplication()).getSharedPref();
		Set<String> foodTypesPref = sharedPref.getStringSet(
				getString(R.string.food_types_preference_saving),
				new HashSet<String>());
		for (String type : foodTypesPref) {
			FoodType item;
			if (type.equals("Seafood")) {
				item = FoodType.SEAFOOD;
			} else if (type.equals("Fastfood")) {
				item = FoodType.FASTFOOD;
			} else if (type.equals("Pizza")) {
				item = FoodType.PIZZA;
			} else if (type.equals("Asian food")) {
				item = FoodType.ASIAN_FOOD;
			} else if (type.equals("Vegetarian food"))
				item = FoodType.VETEGARIAN_FOOD;
			else
				item = FoodType.BEEF_PORK_CHICKEN;
			userPref.getFoodtypes().add(item);
		}

		String priceType = sharedPref.getString(
				getString(R.string.price_type_preference_saving), "CHEAP");
		if (priceType.equals("CHEAP"))
			userPref.setPriceType(Domain.PriceType.CHEAP);
		else if (priceType.equals("MEDIUM"))
			userPref.setPriceType(Domain.PriceType.MEDIUM);
		else if (priceType.equals("EXPENSIVE"))
			userPref.setPriceType(Domain.PriceType.EXPENSIVE);

		userPref.setBuyToGo(sharedPref.getBoolean(
				getString(R.string.buy_go_preference_saving), false));
		userPref.setFoodTypeWeight(sharedPref.getFloat(
				getString(R.string.food_types_weight_saving), 0));
		userPref.setPriceTypeWeight(sharedPref.getFloat(
				getString(R.string.price_types_weight_saving), 0));
		userPref.setBuyToGoWeight(sharedPref.getFloat(
				getString(R.string.buy_go_weight_saving), 0));
		PreferenceContext pref = new PreferenceContext(userPref);
		System.out.println(userPref.getFoodtypes());
		System.out.println(userPref.getPriceType());

		// Mode mode = (Mode) getIntent().getSerializableExtra("mode");
		Mode mode = ((MobileApplication) getApplication()).getMode();

		RecommenderEngine engine = new RecommenderEngine(spa, soc, pref, mode,
				location);
		List<Restaurant> data = engine.process(restaurants);

		RestaurantAdapter adapter = new RestaurantAdapter(this,
				R.layout.list_row_layout, data);
		listview = (ListView) findViewById(R.id.restaurant_list);

		listview.setAdapter(adapter);
		listview.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> a, View view, int position,
					long id) {
				Restaurant item = (Restaurant) listview
						.getItemAtPosition(position);
				openRestaurantDetail(item);

			}
		});
	}

	protected void openRestaurantDetail(Restaurant item) {
		Intent intent = new Intent(this, RestaurantDetailActivity.class);
		((MobileApplication) getApplication()).setRestaurant(item);
		startActivity(intent);
	}

	/**
	 * Set up the {@link android.app.ActionBar}, if the API is available.
	 */
	@TargetApi(Build.VERSION_CODES.HONEYCOMB)
	private void setupActionBar() {
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
			getActionBar().setDisplayHomeAsUpEnabled(true);
		}
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		// getMenuInflater().inflate(R.menu.display_restaurant, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case android.R.id.home:
			// This ID represents the Home or Up button. In the case of this
			// activity, the Up button is shown. Use NavUtils to allow users
			// to navigate up one level in the application structure. For
			// more details, see the Navigation pattern on Android Design:
			//
			// http://developer.android.com/design/patterns/navigation.html#up-vs-back
			//
			NavUtils.navigateUpFromSameTask(this);
			return true;
		}
		return super.onOptionsItemSelected(item);
	}

	private void loadData() {
		// TODO Add pre-defined restaurant data
		Restaurant restaurant1 = new Restaurant("Bakgarden",
				"Rd 22 b 1776 Halden", Arrays.asList(FoodType.SEAFOOD,
						FoodType.BEEF_PORK_CHICKEN), PriceType.EXPENSIVE,
				"11.390657", "59.123275", 4);
		restaurant1.setTakeAway(false);
		List<RestaurantReview> listReviews1 = new ArrayList<RestaurantReview>(
				Arrays.asList(new RestaurantReview("Rune Kinnerod", Date
						.valueOf("2013-01-01"), "Good coffee!", 4)));
		restaurant1.setReviews(listReviews1);
		restaurant1.setMenu(R.drawable.bakgarden);
		restaurants.add(restaurant1);

		Restaurant restaurant2 = new Restaurant("Saigon Take Away",
				"Storgata 1 1776 Halden", Arrays.asList(FoodType.FASTFOOD,
						FoodType.BEEF_PORK_CHICKEN, FoodType.ASIAN_FOOD),
				PriceType.CHEAP, "11.387420", "59.124155", 5);
		restaurant2.setTakeAway(true);
		List<RestaurantReview> listReviews2 = new ArrayList<RestaurantReview>(
				Arrays.asList(new RestaurantReview(
						"Que Tran",
						Date.valueOf("2014-02-05"),
						"Asian food with reasonable price. You should go there!",
						5)));
		restaurant2.setReviews(listReviews2);
		restaurant2.setMenu(R.drawable.saigon);
		restaurants.add(restaurant2);

		Restaurant restaurant3 = new Restaurant("Bryggerhuset",
				"Jacob Stuarts gate 9 1776 Halden", Arrays.asList(
						FoodType.FASTFOOD, FoodType.BEEF_PORK_CHICKEN,
						FoodType.VETEGARIAN_FOOD), PriceType.MEDIUM,
				"11.388345", "59.124759", 5);
		restaurant3.setTakeAway(true);
		List<RestaurantReview> listReviews3 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"Arne Wallin",
								Date.valueOf("2013-02-07"),
								"Pleasant environment. Yummy homemade ice cream!",
								5),
						new RestaurantReview(
								"A Google User",
								Date.valueOf("2013-04-05"),
								"Good lunsretter, nice betnrning, good coffee. A bit expensive.",
								5)));
		restaurant3.setReviews(listReviews3);
		restaurant3.setMenu(R.drawable.brhuset);
		restaurants.add(restaurant3);

		Restaurant restaurant4 = new Restaurant("American Pizza and Desert",
				"Svenskegata 3, 1776 Halden, Norway", Arrays.asList(
						FoodType.FASTFOOD, FoodType.PIZZA), PriceType.MEDIUM,
				"11.388617", "59.123172", 5);
		List<RestaurantReview> listReviews4 = new ArrayList<RestaurantReview>(
				Arrays.asList(new RestaurantReview("Harald Hansen", Date
						.valueOf("2014-03-06"), "King Pizza", 5)));
		restaurant4.setReviews(listReviews4);
		restaurant4.setTakeAway(true);
		restaurant4.setMenu(R.drawable.americanpizza);
		restaurants.add(restaurant4);

		Restaurant restaurant5 = new Restaurant("Butt's Bistro & Tandoori AS",
				"Tollbugata 3, 1767 Halden, Norway", Arrays.asList(
						FoodType.FASTFOOD, FoodType.BEEF_PORK_CHICKEN,
						FoodType.VETEGARIAN_FOOD, FoodType.ASIAN_FOOD),
				PriceType.MEDIUM, "11.385849", "59.119242", 3);
		restaurant5.setTakeAway(true);
		List<RestaurantReview> listReviews5 = new ArrayList<RestaurantReview>(
				Arrays.asList(new RestaurantReview(
						"Harald Hansen",
						Date.valueOf("2013-02-16"),
						"We have used this restaurant for many years, both through visits and take-away. The food has always been very good and the service too. Reasonable prices on food and spacious portions. Are you fond of Indian food this is the place you should try in Halden.",
						3)));
		restaurant5.setReviews(listReviews5);
		restaurant5.setMenu(R.drawable.butt);
		restaurants.add(restaurant5);

		Restaurant restaurant6 = new Restaurant("Pizzeria Divan",
				"Fisketorget 3, 1771 Halden, Norway", Arrays.asList(
						FoodType.FASTFOOD, FoodType.PIZZA,
						FoodType.VETEGARIAN_FOOD), PriceType.MEDIUM,
				"11.385120", "59.121685", -1);
		restaurant6.setTakeAway(true);
		restaurant6.setMenu(R.drawable.divan);
		restaurants.add(restaurant6);

		Restaurant restaurant7 = new Restaurant("Dragon houseS",
				"Borgergata 3, 1767 Halden, Norway", Arrays.asList(
						FoodType.BEEF_PORK_CHICKEN, FoodType.ASIAN_FOOD),
				PriceType.MEDIUM, "11.389979", "59.120202", 3);
		restaurant7.setTakeAway(true);
		List<RestaurantReview> listReviews7 = new ArrayList<RestaurantReview>(
				Arrays.asList(new RestaurantReview(
						"Kjeg",
						Date.valueOf("2013-03-01"),
						"I give it 3 for good service and take-out, but this really isnt chineese food. every dish tastes the same and has been watering out through the years into a norwegian chineese-style of food.",
						3)));
		restaurant7.setReviews(listReviews7);
		restaurant7.setMenu(R.drawable.dragonhouse);
		restaurants.add(restaurant7);

		Restaurant restaurant8 = new Restaurant("Marco polo pizza",
				"Busterudsgate 27, 1776 Halden, Norway",
				Arrays.asList(FoodType.PIZZA), PriceType.CHEAP, "11.382967",
				"59.125064", 5);
		restaurant8.setTakeAway(true);
		List<RestaurantReview> listReviews8 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview("Anomynous", Date
								.valueOf("2012-03-01"), "Cheap and good pizza",
								5),
						new RestaurantReview("Anomynous", Date
								.valueOf("2012-02-07"),
								"Great pizza! good service and low prices", 5)));
		restaurant8.setReviews(listReviews8);
		restaurant8.setMenu(R.drawable.marcopolo);
		restaurants.add(restaurant8);

		Restaurant restaurant9 = new Restaurant("Dragon Plaza Ans",
				"Kongens Brygge 3 1767 Halden", Arrays.asList(
						FoodType.BEEF_PORK_CHICKEN, FoodType.VETEGARIAN_FOOD),
				PriceType.MEDIUM, "11.387506", "59.119118", 2);
		restaurant9.setTakeAway(true);
		List<RestaurantReview> listReviews9 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview("Tord Nilsen", Date
								.valueOf("2013-08-01"), "Friendly, but not good food", 2),
						new RestaurantReview(
								"Thomas Sirland",
								Date.valueOf("2013-13-08"),
								"Good Chinese food inland port in Halden. Fine outdoor dining",
								3)));
		restaurant9.setReviews(listReviews9);
		restaurant9.setMenu(R.drawable.dragonplaza);
		restaurants.add(restaurant9);

		Restaurant restaurant10 = new Restaurant("Campino",
				"Kirkegata 26 1767 Halden", Arrays.asList(FoodType.PIZZA,
						FoodType.FASTFOOD), PriceType.CHEAP, "11.386039",
				"59.120596", 4);
		restaurant10.setTakeAway(true);
		List<RestaurantReview> listReviews10 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"Casper Stoten",
								Date.valueOf("2012-08-01"),
								"Big pizza menu with lot of greasy yum-yums. I especially recommend the \"Tistedal\"-pizza, a classic!  Bon apetit!",
								3),
						new RestaurantReview("Anonymous", Date
								.valueOf("2011-08-13"), "Best pizza in Halden",
								5)));
		restaurant10.setReviews(listReviews10);
		restaurant10.setMenu(R.drawable.campino);
		restaurants.add(restaurant10);

		Restaurant restaurant11 = new Restaurant("McDonalds",
				"Walkers gate 4 1771 Halden", Arrays.asList(FoodType.FASTFOOD),
				PriceType.CHEAP, "11.383372", "59.121511", 3);
		List<RestaurantReview> listReviews11 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"Kjeg",
								Date.valueOf("2013-03-24"),
								"Nice food and good service.",
								3)));
		restaurant11.setReviews(listReviews11);
		restaurant11.setTakeAway(true);
		restaurant11.setMenu(R.drawable.md);
		restaurants.add(restaurant11);

		Restaurant restaurant12 = new Restaurant("Erlandsen Conditori AS",
				"Storgata 10 1771 Haldenn", Arrays.asList(FoodType.FASTFOOD),
				PriceType.CHEAP, "11.387166", "59.123010", 4);
		restaurant12.setTakeAway(true);
		List<RestaurantReview> listReviews12 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"Kjeg",
								Date.valueOf("2013-03-24"),
								"This is a very old bakery/cafe in Halden. A nice place to have a coffie at daytime and an extreemely nice place in night time when they on ocascions throw a live concert and serve beers",
								4),
						new RestaurantReview("Fitznicely", Date
								.valueOf("2012-01-12"),
								"Wonderful, historical place in Halden", 5),
						new RestaurantReview(
								"mother-of-love",
								Date.valueOf("2012-01-20"),
								"nice atmosphere and friendly staff, Try hot cocoa with whipped cream",
								4)));
		restaurant12.setReviews(listReviews12);
		restaurant12.setMenu(R.drawable.erlandsen);
		restaurants.add(restaurant12);

		Restaurant restaurant13 = new Restaurant(
				"Fabian restaurant og Pannekakeri", "Torget 5 1767 Halden",
				Arrays.asList(FoodType.FASTFOOD, FoodType.VETEGARIAN_FOOD),
				PriceType.MEDIUM, "11.387166", "59.119938", 3);
		restaurant13.setTakeAway(false);
		List<RestaurantReview> listReviews13 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"GNRMatt",
								Date.valueOf("2014-01-31"),
								"The waiter spoke English, however, the restaurant did not have English menus. Our waiter was very kind and translated a good portion of the menu for us and helped translate items that we were interested in for lunch",
								4),
						new RestaurantReview(
								"LemonTree637",
								Date.valueOf("2014-01-14"),
								"abian was a very nice experiment.The restaurant is furnished with very nice old furniture,and can remember elder people of days passed by.Walls are very nice decorated with paintings witch you also can purchase if you like them.We ordered ovenbacked cod with a pea puree,which tasted exquisite.Very polite waiter who look after you",
								2),
						new RestaurantReview(
								"Bart Z",
								Date.valueOf("2013-09-11"),
								"I had dinner with a business relation on a Tuesday evening. We had made reservations, but that didn't really seem neccessary, as the restaurant was totally empty. And to be honest, this is a big shame, as it looks marvelous! Every single table is different, with different chairs at every table, 2013- 09-11",
								3)));
		restaurant13.setReviews(listReviews13);
		restaurant13.setMenu(R.drawable.fabian);
		restaurants.add(restaurant13);

		Restaurant restaurant14 = new Restaurant("Flamenco",
				"Jernbanegate 2, Halden, 1767", Arrays.asList(FoodType.PIZZA,
						FoodType.VETEGARIAN_FOOD, FoodType.BEEF_PORK_CHICKEN),
				PriceType.EXPENSIVE, "11.386063", "59.119707", 4);
		restaurant14.setTakeAway(true);
		List<RestaurantReview> listReviews14 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"alm5050",
								Date.valueOf("2013-06-16"),
								"We had some trouble finding a restaurant open on a Tuesday. Flamenco is an eclectic mix of many cuisines, including Norwegian, Italian, American, and Spanish. I had a Norwegian/Spanish styled prawn dish as an appetizer, nice and spicy! The Italian styled pizza was nice...ham and mushrooms with plenty of toppings. The individual size is way too big for one person,...",
								4),
						new RestaurantReview(
								"Kjeg",
								Date.valueOf("2013-03-01"),
								"Indians run this place, and I never visit this place if its not for drinking beers, eating a very good pizza and watch football with the guys. the food exept pizza is ok. It has no soul because they try to do everything at the same time, but this doesnt mean its a bad place. Been here many times and...",
								4)));
		restaurant14.setReviews(listReviews14);
		restaurant14.setMenu(R.drawable.flamenco);
		restaurants.add(restaurant14);

		Restaurant restaurant15 = new Restaurant("Brygga mat- og vinhus",
				"Langbrygga 1, 1767 Halden, Norway", Arrays.asList(
						FoodType.SEAFOOD, FoodType.VETEGARIAN_FOOD,
						FoodType.BEEF_PORK_CHICKEN), PriceType.EXPENSIVE,
				"11.386460", "59.118947", 5);
		restaurant15.setTakeAway(false);
		List<RestaurantReview> listReviews15 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"Karianne_13",
								Date.valueOf("2014-03-24"),
								"Superb food ( fish) and wine and excellent service ! Very nice location at the harbour. Relaxed atmosphere. Very good wine reccomendation !",
								5),
						new RestaurantReview(
								"Gogstad",
								Date.valueOf("2013-12-30"),
								"Greate food, greate place! White fish is not my favourite food, but when it is made like this, fish is as good as a premium steak ;)",
								5),
						new RestaurantReview(
								"geir j",
								Date.valueOf("2014-03-01"),
								"Have been here many times. Always satisfied with food and wine. We prefer the 3 or 4 course menue, a very good offer. When a Bocuse d'Or winner, and european champion operate this restaurant, the price level of food and wine is very good, and this restaurant is too everyone that enjoy gourmet food. Wine prices was very low calculated when they started , but prices has gone up , but there is still realy good value too money at many wines. Brygga 11 operate from May to end off August, and November and December. We look forward to May, enjoying a gourmet meal.",
								5)));
		restaurant15.setReviews(listReviews15);
		restaurant15.setMenu(R.drawable.brygga);
		restaurants.add(restaurant15);

		Restaurant restaurant16 = new Restaurant("Pizza Xpressen",
				"Kongens Brygge 2 , Halden 1767", Arrays.asList(FoodType.PIZZA,
						FoodType.VETEGARIAN_FOOD), PriceType.MEDIUM,
				"11.388115", "59.118811", 4);
		restaurant16.setTakeAway(true);
		List<RestaurantReview> listReviews16 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview("Adt", Date.valueOf("2014-03-24"),
								"Delicous Pizza. Fast delivery", 4),
						new RestaurantReview("Gogstad", Date
								.valueOf("2013-12-30"),
								"Good pizza. I love it!", 4)));
		restaurant16.setReviews(listReviews16);
		restaurant16.setMenu(R.drawable.pizzaxpressen);
		restaurants.add(restaurant16);

		Restaurant restaurant17 = new Restaurant("Lunchbaren",
				"Torget 1, 1767 Halden", Arrays.asList(FoodType.FASTFOOD,
						FoodType.BEEF_PORK_CHICKEN), PriceType.CHEAP,
				"11.387519", "59.119325", -1);
		restaurant17.setTakeAway(true);
		restaurant17.setMenu(R.drawable.lunchbaren);
		restaurants.add(restaurant17);

		Restaurant restaurant18 = new Restaurant("Halden Gatekjokken",
				"Jacob Stuarts gate, Halden, Norway",
				Arrays.asList(FoodType.FASTFOOD), PriceType.CHEAP, "11.387900",
				"59.124796", -1);
		restaurant18.setTakeAway(true);
		restaurant18.setMenu(R.drawable.gatekjokken);
		restaurants.add(restaurant18);

		Restaurant restaurant19 = new Restaurant(
				"Paviljongen pizza Marwan Hasan",
				"Storgata 22, 1776 Halden, Norway", Arrays.asList(
						FoodType.PIZZA, FoodType.FASTFOOD), PriceType.CHEAP,
				"11.387063", "59.124481", -1);
		restaurant19.setTakeAway(true);
		restaurant19.setMenu(R.drawable.paviljongen);
		restaurants.add(restaurant19);

		Restaurant restaurant20 = new Restaurant("Sakura Sushi Takeway AS",
				"Storgata 11, 1771 Halden", Arrays.asList(FoodType.SEAFOOD,
						FoodType.ASIAN_FOOD), PriceType.MEDIUM, "11.388093",
				"59.122999", 3);
		restaurant20.setTakeAway(true);
		List<RestaurantReview> listReviews20 = new ArrayList<RestaurantReview>(
				Arrays.asList(
						new RestaurantReview(
								"Thomas Sirland",
								Date.valueOf("2014-04-02"),
								"Good sushi served by cheerful people! In the middle of the pedestrian street! Open until 21 hours + fast takeaway",
								3),
						new RestaurantReview("Hieu Huynh", Date
								.valueOf("2014-04-01"),
								"Nice service and good food.", 4)));
		restaurant20.setReviews(listReviews20);
		restaurant20.setMenu(R.drawable.sakurasushi);
		restaurants.add(restaurant20);

	}
}
